#include <iostream>

using namespace std;

class parent {
public:
        void foo(void) {cout << "parent::foo()" << endl;}
};

class child : public parent {
public:
        void foo(void) {cout << "child::foo()" << endl;}
};

int main()
{
        parent a;
        child b;

        a.foo();
        b.foo();

        return 0;
}
